<?php
/*
 * Direction en fonction de langue du navigateur
 * fr_* => fr
 * pt_* 
 * pt_BR =>
 * default => fr
 */

$locales = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$language = strtolower(substr(chop($locales[0]),0,2));

if($language == 'pt')
    header('Location: pt/index.php');
else
    header('Location: fr/index.php');